import ora, {oraPromise} from "ora";


const spinner = ora('loading').start()

spinner.prefixText ='download'
spinner.frames = ['-','\\','|','/']

setTimeout(() => {
    spinner.color = 'yellow';
    spinner.text = 'Loading rainbows 10%';
//   spinner.stop()
}, 1000);

setTimeout(() => {
    spinner.color = 'yellow';
    spinner.text = 'Loading rainbows 9%';
spinner.stop()
spinner.succeed('Loading rainbows 100%')

}, 3000);


// (async () => {
//     const spinner = ora('Loading unicorns').start();
//     await new Promise(resolve => setTimeout(resolve, 3000));
//     spinner.color = 'yellow';   
//     spinner.text = 'Loading rainbows';
// wa

// })()